package com.jet.merchant.service;

import com.jet.core.model.vo.PageVo;
import com.jet.merchant.domain.dto.AccountDto;
import com.jet.merchant.domain.dto.FirstSetPasswordDto;
import com.jet.merchant.domain.entity.ClerkAccount;
import com.baomidou.mybatisplus.extension.service.IService;
import com.jet.merchant.domain.query.AccountQuery;
import com.jet.merchant.domain.vo.AccountDetailVo;
import com.jet.merchant.domain.vo.UserVo;

import java.util.List;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author author
 * @since 2025-02-25
 */
public interface IClerkAccountService extends IService<ClerkAccount> {

    String register(long merchantNo, long storeNo, String phone, String openId);

    String save(long merchantNo, AccountDto dto);

    void edit(String id, AccountDto dto);

    void editStoreNo(String id, long storeNo, String roleId);

    void editName(String id, String name);

    void editPhone(String id, String originalPhone, String newPhone);

    void editOpenId(String id, String openId);

    void editStatus(String id, int status);

    void editPassword(String id, String newPassword);

    void initAccount(long merchantNo, long storeNo, String accountId, FirstSetPasswordDto dto);

    void editPassword(String id, String originalPassword, String newPassword);

    void editMobileCashMode(String id, int cashMode);

    void delete(String id);

    UserVo info(String id);

    boolean existByPhone(String phone);

    void checkStore(long merchantNo, String id, long checkStoreNo);

    ClerkAccount findByPhone(String phone);

    ClerkAccount findByOpenId(String openId);

    PageVo<UserVo> page(long merchantNo, long storeNo, String accountId, AccountQuery query);

    List<UserVo> list(long merchantNo, long storeNo, String accountId, AccountQuery query);

    List<UserVo> findAllByStoreNo(long merchantNo, long storeNo);

    List<UserVo> findAll(long merchantNo);

    List<UserVo> findAllByIds(long merchantNo, List<String> accountIds);

    List<UserVo> accountSearch(long merchantNo, String searchKey);

    AccountDetailVo detail(long merchantNo, long storeNo, String accountId);
}
